package Demo4protected;


import demo3protected.Base;

/**
 * ClassName Deroved
 * Description TODO
 * Author Yanyan
 * Date 2025/11/11 21:47
 * Version 1.0
 */
public class Derived extends Base {

    public void test() {
        System.out.println(super.a);
    }

    public static void main(String[] args) {
        Derived derived = new Derived();
        System.out.println(derived.a);

        //非子类无法访问
//        C c = new C();
//        System.out.println(c.a);

        //final修饰后无法修改，无法继承
        final int a = 10;
        //a = 100;
    }
}

